﻿<%@ Page Title="" Language="C#" MasterPageFile="~/views/customer/customermaster.master" AutoEventWireup="true" CodeFile="sp.aspx.cs" Inherits="views_customer_sp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MyContent" Runat="Server">
    <div class="container-fluid">
       <div class="row">
           <div class="col">
               <h3 class="text-center" style="color: white">商品信息</h3>

           </div>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" 
        AutoGenerateColumns="False"  DataSourceID="LinqDataSource1" DataKeyNames="ProductID" PageSize="5" OnRowDataBound="GridView1_RowDataBound" BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px" CellPadding="4" CellSpacing="2" ForeColor="Black" >
        <Columns>
            <asp:BoundField DataField="ProductID" HeaderText="商品编号" InsertVisible="False" ReadOnly="True" SortExpression="ProductID" />
            <asp:BoundField DataField="Producttypeid" HeaderText="商品类别id" SortExpression="Producttypeid" />
            <asp:BoundField DataField="ProductName" HeaderText="商品名称" ReadOnly="True" />
            <asp:BoundField DataField="ProductPrice" HeaderText="商品价格" SortExpression="ProductPrice" />
            <asp:BoundField DataField="ProductDescription" HeaderText="商品描述" />
            <asp:BoundField DataField="ProductStock" HeaderText="库存" SortExpression="ProductStock" />
            <asp:BoundField DataField="MerchantID" HeaderText="供应商" />
            <asp:ImageField DataImageUrlField="ProductImage" HeaderText="图片">
                <ControlStyle Height="150px" Width="150px" />
            </asp:ImageField>
        </Columns>
        <FooterStyle BackColor="#CCCCCC" />
        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
        <PagerSettings FirstPageText="首页" LastPageText="尾页" Mode="NextPreviousFirstLast" NextPageText="下一页" PreviousPageText="上一页" />
        <PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
        <RowStyle BackColor="White" />
        <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F1F1F1" />
        <SortedAscendingHeaderStyle BackColor="#808080" />
        <SortedDescendingCellStyle BackColor="#CAC9C9" />
        <SortedDescendingHeaderStyle BackColor="#383838" />
    </asp:GridView>
    <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="PJTY.dal.DataClasses1DataContext" EntityTypeName="" TableName="Product1">
    </asp:LinqDataSource>
    <p style="color:white">每页显示
    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
        <asp:ListItem>5</asp:ListItem>
        <asp:ListItem>10</asp:ListItem>
    </asp:DropDownList>
    条记录&nbsp;&nbsp;</p>
    <asp:Label ID="Label1" runat="server" Text="Label">

    </asp:Label>
</asp:Content>

